#pragma once
#include <string>

extern int connect_to_plc(char *ip);
extern int disconnect_from_plc(void);
extern int read_from_plc_db(int index, int start, int lens, BYTE *buf);
extern int write_to_plc_db(int index, int start, int lens, void *buf);

extern int connect_to_plc2(char *ip);
extern int disconnect_from_plc2(void);
extern int read_from_plc_db2(int index, int start, int lens, BYTE *buf);
extern int write_to_plc_db2(int index, int start, int lens, void *buf);

extern std::string read_string(int index, int start);